#ifndef BALL_H
#define BALL_H

#include <QGraphicsItem>
#include <QObject>
#include <QtDeclarative/QDeclarativeItem>
#include <vector>

class Ball : public QGraphicsEllipseItem {
    std::vector<std::vector<QGraphicsEllipseItem*> >* cells;
    std::vector<std::vector<bool> >* isField;
    QPointF posBefore;
    QPointF newPos;
    bool moving;
public:
    Ball(qreal x, qreal y, qreal w, qreal h, std::vector<std::vector<QGraphicsEllipseItem*> >* cells, std::vector<std::vector<bool> >* isField);
    void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0);
    void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);
};

#endif // BALL_H
